<template>
	<view class="zy-row">
		<image class="zy-icon-sm" mode='widthFix' :src="getIcon"></image>
		<view class="zy-text-white-lg-bold zy-ml-sm">{{text}}</view>
	</view>
</template>

<script>
	export default {
		name:"zy-constellation",
		data() {
			return {
				icon:''
			};
		},
		props:{
			text:{
				type: String,
				default:''
			},
		},
		computed:{
			getIcon(){
				let iconStr = 'constellation_';
				if(this.text.includes('金牛')){
					iconStr+='jinniu'
				}else if(this.text.includes('白羊') || this.text.includes('羊')){
					iconStr+='baiyang'
				}else if(this.text.includes('天蝎')){
					iconStr+='tianxie'
				}else if(this.text.includes('处女')){
					iconStr+='chunv'
				}else if(this.text.includes('狮子')){
					iconStr+='shizi'
				}else if(this.text.includes('射手')){
					iconStr+='sheshou'
				}else if(this.text.includes('双鱼')){
					iconStr+='shuangyu'
				}else if(this.text.includes('双子')){
					iconStr+='shuangzi'
				}else if(this.text.includes('巨蟹')){
					iconStr+='juxie'
				}else if(this.text.includes('天枰') || this.text.includes('天秤')){
					iconStr+='tianping'
				}else if(this.text.includes('水瓶')){
					iconStr+='shuiping'
				}else if(this.text.includes('魔羯') || this.text.includes('摩羯')){
					iconStr+='mojie'
				}else{
					iconStr+='jinniu'
				}
				return this.getImageUrl(iconStr + ".png");
			}
		},
		methods:{
			
		}
	}
</script>

<style>

</style>